package net.tycmc.cty.ctyms.timejob.iems.job;

import net.tycmc.cty.ctyms.timejob.common.DateControl;
import net.tycmc.cty.ctyms.timejob.common.LogUtil;
import net.tycmc.cty.ctyms.timejob.iems.service.IOFenTipServcie;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 定时作业，进出围栏提示
 * @author jinjiayu
 *
 */
public class IOFenTipJob extends QuartzJobBean {
	
	private IOFenTipServcie ioFenTip;

	public IOFenTipServcie getJobData() {
		return ioFenTip;
	}

	public void setJobData(IOFenTipServcie ioFenTip) {
		this.ioFenTip = ioFenTip;
	}

	@Override
	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
		//进出围栏提示
		LogUtil.info(this.getClass().getName(), "进出围栏提示开始执行，时间："+DateControl.getDateFileName());
		this.ioFenTip.IOFenTip();
		LogUtil.info(this.getClass().getName(), "进出围栏提示执行完成，时间："+DateControl.getDateFileName());
		//时效预警
		LogUtil.info(this.getClass().getName(), "时效预警开始执行，时间："+DateControl.getDateFileName());
		this.ioFenTip.EFFTip();
		LogUtil.info(this.getClass().getName(), "时效预警执行完成，时间："+DateControl.getDateFileName());
	}

}
